package com.ssm.platform;

import com.ssm.basis.configuration.ConfigurationPackage;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

import static org.springframework.boot.Banner.Mode.CONSOLE;

@SpringBootApplication(scanBasePackageClasses = ConfigurationPackage.class)
public class SsmApplication extends SpringBootServletInitializer {
    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(SsmApplication.class);
        application.setBannerMode(CONSOLE);
        application.run(args);
        // SpringHelper.setApplicationContext(application.run(args));
        // SpringHelper.setApplicationContext(SpringApplication.run(SSMApplication.class, args));
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(SsmApplication.class);
    }
}
